package dongshi.daddy.state.context;

import dongshi.daddy.state.state.LogisticsState;

import java.util.Objects;

// context
public class JdLogistics {
    // context中维护state
    private LogisticsState logisticsState;

    public void setLogisticsState(LogisticsState logisticsState) {
        this.logisticsState = logisticsState;
    }

    public LogisticsState getLogisticsState() {
        return logisticsState;
    }

    public void doAction() {
        Objects.requireNonNull(logisticsState);
        logisticsState.doAction();
    }
}